<?php echo $html->css("screen/staff_list_staff.css");?>
<?php echo $this->element('menu', array("active" => "10.b"));?>
<ul class="breadcrumb">
	<li>
	  <?php echo $this->Html->link(__('Staff  ', true), array('action' => 'index', 'controller' => 'staffs'), array('class'=>'fist_link'));?>
	</li>
	<li>          
	  <?php echo $this->Html->link(__('User types  ', true), array('action' => 'index'));?>
	</li>
  </ul>
<div id="content" class="staffTypes index">
  <script>
  function delete_ajax(url) {		
		$.get(url, function (data){
			if (data=="success" || data==""){
				location.reload(true);
			}else{
				alert(data);
			}
		});	
	}
  </script>
	<?php echo $this->Html->link(__('Add User type', true), array('action' => 'add'), array('class'=>'bt')); ?>	
	<div class="table table_p_15_2 boder">
          <table width="100%"  cellpadding="0" cellspacing="0" align="right">
	<thead>
              <tr>
                <td ><?php echo $this->Paginator->sort('User type','title');?></td>
				<td></td>
              </tr>
            </thead>
	<?php
	$i = 0;
	foreach ($staffTypes as $staffType):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tbody>
	<tr<?php echo $class;?>>		
		<td><?php echo $staffType['StaffType']['title']; ?>&nbsp;</td>				
		<td class="actions" align="right">			
			<?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $staffType['StaffType']['id'])); ?>
			|&nbsp;<?php echo $this->Html->link(__('Remove', true), array('action' => 'delete', $staffType['StaffType']['id']), array('onclick'=>'delete_ajax(this.href);return false;')); ?>
		</td>		
	</tr>
<?php endforeach; ?>
            </tbody>
          </table>
        </div>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>		